<template>
  <div class="progressbar">
    <div class="progressbar1">
      <div class="bar" :style="{ width: value1 }"></div>
      <div class="label" :style="{ left: value1 }">
        <span></span>进度{{finish}}/{{imgTotal}}   当前任务{{finish>=imgTotal? finish:finish + 1}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value1: this.value + '%',
    };
  },
  props: ["value",'imgTotal','finish'],

  created() {},
  mounted() {},
  computed: {},
  methods: {},
  watch: {
    value(newVal, oldVal) {
      this.value1 = newVal + "%";
    },
  },
};
</script>

<style scoped>
.progressbar {
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 100%;
  height: 10px;
  /* padding: 10px 25px; */
  border-radius: 8px;
  margin: 40px auto;
  -webkit-box-shadow: 0px 4px 4px -4px rgb(0 0 0 / 40%),
    0px -3px 3px -3px rgb(0 0 0 / 25%);
  box-shadow: 0px 4px 4px -4px rgb(0 0 0 / 40%),
    0px -3px 3px -3px rgb(0 0 0 / 25%);
}
/* .progressbar1 {
  position: absolute;
  display: block;
  content: "";
  width: calc(100% - 50px);
  height: 20px;
  top: 10px;
  left: 25px;
  border-radius: 20px;
  background: #dfdfdf;
} */
.bar {
  position: absolute;
  display: block;
  width: 1%;
  height: 10px;
  top: 0;
  left: 0;
  background-color: #0077ffcc;
  border-radius: 10px;
  background-size: 3em 3em;
  /* background-image: linear-gradient(
    -45deg,
    transparent 0em,
    transparent 0.7em,
    #0077ff 0.9em,
    #0077ff 2.1em,
    transparent 2.1em,
    transparent 2.9em,
    #0077ff 3.1em
  ); */
  animation: ani 500ms infinite linear;
  -webkit-box-shadow: 0px 4px 4px -4px rgb(0 0 0 / 40%),
    0px -3px 3px -3px rgb(0 0 0 / 25%);
  box-shadow: 0px 4px 4px -4px rgb(0 0 0 / 40%),
    0px -3px 3px -3px rgb(0 0 0 / 25%);
}
@keyframes ani {
  0% {
    background-position: 0 0;
}
100% {
    background-position: 3em 0;
}
}

.label {
  width: 176px;
  position: absolute;
  display: block;
 background: url('@/assets/washImg/形状结合.png');
   /* background-color: rgba(0, 161, 255, 0.5); */
  font-size: 14px;
 
  line-height: 30px;
  top: -30px;
  left: 1%;
  transform: translateX(-35px);
  /* overflow: hidden; */
  border-radius: 5px;
   color: rgba(39, 175, 255, 1);
  text-align: center;
}
/* .label span {
  display: block;
  width: 0;
  height: 0;
  border: 10px solid #0077ff;
  position: absolute;
  bottom: -20px;
  left: 25px;
  border-bottom: 10px solid rgba(21, 255, 0, 0);
  border-left: 10px solid rgba(0, 17, 255, 0);
  border-right: 10px solid rgba(255, 0, 242, 0);
  border-top: 10px solid #0077ff;
} */
</style>
